$(window).load(function() {
  
  // Tab click, set active tab
  $('body > div > ul.menu a').click(function() {
  	$('body > div > ul.menu li.active').removeClass();
  	$(this).parent().addClass('active');  	
  });
  
  // There is an active tab on page load, set active tab color
  if (location.hash.length > 0) {
    $('ul.menu a[href=' + location.hash + ']').trigger('click');
  }
});
